package com.yzd.learnjava.generics;

import java.util.ArrayList;
import java.util.List;

public class GenericAndCovariance {
	public static void main(String[] args) {
		List<? extends Fruit2> flist = new ArrayList<Apple2>();
//		flist.add(new Fruit2());
//		flist.add(new Apple2());
//		flist.add(new Object());
		
		Fruit2 fruit2 = flist.get(0);
	}
}
